{block name=body} 

<div class="">
	<h2 class="title">{$zone}</h2>
	{assign var='hasDates' value=0}
	{assign var='hasNews' value=0}
	{foreach $list as $f}
		{if $hasDates eq 1 && $hasNews eq 1}{break}{/if}
		{if $f.record.listing_type_id eq 8}{assign var='hasDates' value=1}{/if}
		{if $f.record.listing_type_id eq 7}{assign var='hasNews' value=1}{/if}
	{/foreach}
	
	{if $hasDates eq 1}
		<div class="row imp-date">
			<div class="col-sm-12">
				<h3 class="title">Important dates</h3>
				<hr>
			</div>
			{foreach $list as $f}
				{if $f.record.listing_type_id eq 8}
					<div class="col-sm-12 imp-date-details">
						<h4>{$f.record.listing_name}</h4>
						<div>{$f.record.listing_content1}</div>
					</div>
				{/if}
		  {/foreach}
		</div>
	{/if}

	{if $hasNews eq 1}
		<div class="row">
			<div class="col-sm-12">
				<h3 class="title lnews">Latest news</h3>
				<a href="javascript:void(0)" onclick="$('.news-item').show('slow'); scrolltodiv('#hidden-news');" class="lnews pull-right">View all</a>
			</div>
			{assign var='cnt' value=0}			
			{foreach $list as $f}
				{if $f.record.listing_type_id eq 7}
					{assign var='cnt' value=$cnt+1}
					<div class="col-sm-4 news-item border-top-listing" {if $cnt gt 4}style="display:none;"{/if}>
                    <div class="btl">
						<img src="{if $f.record.listing_image}{$f.record.listing_image}{else}/admin/images/no-image-available.jpg{/if}" class="img-responsive" alt="News image">
                    <div class="testinfo">
						<div class="testquote">{$f.record.listing_name}</div>
						<div class="small">Posted on {$f.record.news_start_date|date_format:"%Y-%m-%d"}</div>
						<div>{$f.record.listing_meta_description}</div>
						{if $f.record.listing_content1}<div><a href="/admin/edit/news-information/{$f.record.listing_id}">Read more</a></div>{/if}
					</div>
                    </div>
                    </div>
					{if $cnt eq 4}<div id="hidden-news">{/if}
				{/if}
		  {/foreach}
		</div>
	{/if}
</div>


{/block}

{block name=tail}
<script type="text/javascript">
	function scrolltodiv(id) {
		$('html,body').animate({
			scrollTop : $(id).offset().top
		});
	}
</script>
{/block}